package AbstractFactoryPattern;

/**
 * @version: java version 1.8
 * @Author: Zheng
 * @description:
 * @date: 2022-08-10 20:50
 */
public class ColorFarctory extends AbstractFactory{
    @Override
    public Color getColor(String color) {
        if (color==null){
            return null;
        }else if (color.equalsIgnoreCase("RED")){
            return new Red();
        }else if (color.equalsIgnoreCase("GREEN")){
            return new Green();
        }else if (color.equalsIgnoreCase("BLUE")){
            return new Blue();
        }
        return null;
    }

    @Override
    public Shape getShape(String shape) {

        return null;
    }
}